<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai"%>

<link href="<%=request.getContextPath()%>/css/ManageGroup.css"	rel="stylesheet" type="text/css" />

<f:loadBundle basename="messages" var="msg" />
<f:view>
	
	<sakai:view_container title="Manage Group">
		<h:form>
				<h:commandLink action="manageGroup" value="#{msg.manageGroup}"></h:commandLink>
				|
				<h:commandLink action="viewTeacher" value="#{msg.viewTeacher}"></h:commandLink>
		</h:form>
		<sakai:view_content>
			
			<sakai:view_title value="Add group to site" />
			<h:messages globalOnly="true" showSummary="true" styleClass="labelMessage"> </h:messages>
			</br>
			<h:form>
				<h:panelGroup>
					<h:outputText value="#{msg.groupName}" styleClass="labelArea"></h:outputText>
					<h:inputText id="groupNameInput" value="#{ManageGroupBean.groupName}" 
								required="true" />
					<h:message for="groupNameInput" styleClass="labelMessage"></h:message>
				</h:panelGroup>
				</br>
				<h:panelGroup>
					<h:outputText value="#{msg.groupDescription}" styleClass="labelArea"></h:outputText>
					<h:inputText id="groupDescriptionInput" value="#{ManageGroupBean.groupDescription}" 
								size="50" required="true" />
					<h:message for="groupDescriptionInput" styleClass="labelMessage"></h:message>
				</h:panelGroup>
				</br>
				<h:panelGroup>
					<h:outputText value="#{msg.listUser}" styleClass="labelArea"></h:outputText>
					<h:inputTextarea id="textArea" rows="5" cols="9" value="#{ManageGroupBean.listUserId}" 
										required="true" />
					<h:message for="textArea" styleClass="labelMessage"></h:message>
				</h:panelGroup>
				</br>
				<h:panelGroup>
					<h:outputText value="#{msg.listSite}" styleClass="labelArea"></h:outputText>
					<h:selectManyListbox id="sitesListBox" size="5" value="#{ManageGroupBean.siteId}" required="true">
							<f:selectItems value="#{ManageGroupBean.allSiteName}" />
					</h:selectManyListbox>
					<h:message for="sitesListBox" styleClass="labelMessage"></h:message>
				</h:panelGroup>
				</br>
				<h:panelGroup>
					<h:commandButton action="#{ManageGroupBean.addStudentsToGroup}" value="#{msg.addButton}" accesskey="s"></h:commandButton>
					<h:commandButton value="#{msg.cancelButton}" accesskey="c" immediate="true">	</h:commandButton>
				</h:panelGroup>
			</h:form>
		</sakai:view_content>
	</sakai:view_container>
</f:view>
